<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="csipsimple," />





  <link rel="alternate" href="/atom.xml" title="搁浅丶岁月的变迁" type="application/atom+xml" />






<meta name="description" content="1.空页面ui.SipHome$TabsAdapter         clearDetails                 652    清除Fragment  ui.SipHome$TabsAdapter         onPageScrollStateChanged     625    滑动屏幕  ui.SipHome                     sendFragment">
<meta name="keywords" content="csipsimple">
<meta property="og:type" content="article">
<meta property="og:title" content="9.调试--短信">
<meta property="og:url" content="http://yoursite.com/2017/12/25/2017-12-25-9.调试--短信/index.html">
<meta property="og:site_name" content="搁浅丶岁月的变迁">
<meta property="og:description" content="1.空页面ui.SipHome$TabsAdapter         clearDetails                 652    清除Fragment  ui.SipHome$TabsAdapter         onPageScrollStateChanged     625    滑动屏幕  ui.SipHome                     sendFragment">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-05-28T08:47:43.478Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="9.调试--短信">
<meta name="twitter:description" content="1.空页面ui.SipHome$TabsAdapter         clearDetails                 652    清除Fragment  ui.SipHome$TabsAdapter         onPageScrollStateChanged     625    滑动屏幕  ui.SipHome                     sendFragment">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/12/25/2017-12-25-9.调试--短信/"/>





  <title>9.调试--短信 | 搁浅丶岁月的变迁</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    <a href="https://github.com/liaoren512"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png" alt="Fork me on GitHub"></a>
    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">搁浅丶岁月的变迁</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">没有虽败犹荣，只有成王败寇。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/12/25/2017-12-25-9.调试--短信/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="廖壬">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/ichgo.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="搁浅丶岁月的变迁">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">9.调试--短信</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-12-25T00:00:00+08:00">
                2017-12-25
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i>
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="1-空页面"><a href="#1-空页面" class="headerlink" title="1.空页面"></a>1.空页面</h2><pre><code>ui.SipHome$TabsAdapter         clearDetails                 652    清除Fragment

ui.SipHome$TabsAdapter         onPageScrollStateChanged     625    滑动屏幕

ui.SipHome                     sendFragmentVisibilityChange698    设置目前选择的Fragment可见

ui.SipHome                     getFragmentAt                 671    返回当前Fragment

ui.SipHome$TabsAdapter         getIdForPosition             550    返回Fragment对应的id号

ui.fav.CallLogListFragmentPTT     onVisibilityChanged     191    可见状态改变

ui.SipHome                     sendFragmentVisibilityChange698    设置目前选择的Fragment可见

ui.SipHome                     getFragmentAt                 671    返回当前Fragment

ui.SipHome$TabsAdapter         getIdForPosition             550    返回Fragment对应的id号

ui.messages.ConversationsListFragment onVisibilityChanged 360 可见状态改变

ui.messages.ConversationsAdapter     &lt;init&gt;                 57    数据适配器初始化

ui.messages.ConversationsListFragment onCreateLoader     237    加载数据

db.DBProvider         query                                 485    查询

ui.SipHome         onCreateOptionsMenu                     1239    创建Menu菜单

ui.messages.ConversationsListFragment onCreateOptionsMenu 203    创建Menu菜单

ui.messages.ConversationsListFragment changeCursor         409    更新显示过滤后的数据
</code></pre><h2 id="2-作成-发送短信"><a href="#2-作成-发送短信" class="headerlink" title="2.作成,发送短信"></a>2.作成,发送短信</h2><pre><code>1) 初始化界面

ui.messages.ConversationsListFragment$1 onClick     105    作成

ui.messages.ConversationsListFragment  viewDetails  163    创建联系人界面

ui.messages.ConversationsListFragment  viewDetails  175

ui.messages.MessageFragment          getArguments    247

ui.SipHome          onPause                          994    失去焦点

ui.messages.MessageActivity          onCreate          38  创建Message界面

ui.messages.MessageFragment      setOnQuitListener   92

ui.messages.MessageFragment          onAttach          159    绑定Fragment

ui.messages.MessageFragment          onCreate          109    创建通知,绑定SipService

service.SipService                  onBind          1365其他intent绑定到service

service.SipNotifications          &lt;init&gt;              78    通知初始化

ui.messages.MessageFragment          onCreateView      119    初始化界面

service.PreferenceProvider          query              92     查询

ui.messages.MessageFragment          onViewCreated      134    初始化界面

ui.messages.MessageAdapter          &lt;init&gt;          63    消息适配器初始化

models.CallerInfo          getCallerInfoForSelf          126    从content获取Message信息

ui.messages.MessageFragment      onActivityCreated     97    初始化界面

ui.messages.MessageActivity          onStart          54    初始化界面

ui.messages.MessageFragment          onResume          178    初始化界面

service.SipNotifications      setViewingMessageFrom     453

ui.messages.MessageFragment$1 onServiceConnected    219    连接服务器

ui.messages.MessageFragment          onPause          186    失去焦点

service.SipNotifications      setViewingMessageFrom      453

2)创建联络者界面,输入联系人

ui.PickupSipUri                      onCreate          49    创建联络者选择界面

service.PreferenceProvider          query              92    查询

ui.messages.MessageFragment onCreateOptionsMenu      333    创建Menu

db.DBProvider                              query          485    DB查询

api.SipProfile                      &lt;init&gt;          1034根据cursor创建sip profile

db.DBProvider                              query          485    查询

api.SipProfileState                  &lt;init&gt;          186    sip state

api.SipProfile          getDefaultDomain              1607 获取默认帐户

api.SipUri          parseSipContact                  152    解析SIP联系人

api.SipUri$ParsedSipContactInfos getServerSipUri      135    解析SIP服务器URI

ui.dialpad.DialerFragment          onSaveInstanceState 397 保存Activity状态

3)点OK

ui.PickupSipUri          onClick                      90    选择联络人

ui.PickupSipUri          sendPositiveResult          101    setResult()

ui.messages.MessageFragment      onActivityResult      195    接受setResult结果

models.CallerInfo          getCallerInfoFromSipUri      113 建立和检索根据主叫方SIP URI从联系人来电者的相关信息

api.SipUri          getPhoneNumber                  229    提取SIP URI电话号码

ui.messages.MessageFragment          onCreateLoader  311    加载数据

service.SipNotifications      setViewingMessageFrom    453

ui.messages.MessageFragment onCreateLoader          311    加载数据

ui.messages.MessageActivity          onStart          54

ui.messages.MessageFragment          onResume          178    获得焦点

service.SipNotifications      setViewingMessageFrom     453

4)输入联系人

db.DBProvider          query                              485 查询

ui.messages.MessageFragment          onLoadFinished  319    加载完成

db.DBProvider          query                              485

api.SipProfile          &lt;init&gt;                      1034

db.DBProvider          query                              485

api.SipProfileState          createFromContentValue  270 从content读取账号

api.SipProfileState          isActive                  411    返回用户状态

api.SipProfileState          isAddedToStack          535    是否把账号加入Stack

5)点击送信

ui.messages.MessageFragment          onClick          300    点击送信按钮

service.SipService$1          sendMessage              324    送信

service.SipService$SipServiceExecutor          execute 1941

service.SipService$SipServiceExecutor handleMessage 1951 接受消息

service.SipService$SipRunnable          run          2083 运行线程

pjsip.PjSipService          sendMessage                  1463 使用SIP服务器发送短信

api.SipProfile          &lt;init&gt;                      1019 创建用户包装类

pjsip.PjSipService          getProfileState          977    返回动态SIP模式状态

6)启动送信服务

service.SipService          onStart                  1252 启动Sip服务

service.SipService          isConnectivityValid      1336 当前的连接是否有效

service.PreferenceProvider          query              92     查询

db.DBProvider          query                              485    查询

api.SipProfileState          createFromContentValue     270    从content读取账号

service.PreferenceProvider          query              92    查询

api.SipProfileState          isAddedToStack          535    是否把账号加入Stack

service.SipService              getAccount          1851 获取账号

service.PreferenceProvider          query              92    查询

api.SipProfile          getProfileFromDbId          1778 检索SIP对象

db.DBProvider          query                              485    查询

service.PreferenceProvider          query              92    查询

pjsip.PjSipService          setService              147    pj添加SipSever对象

pjsip.PjSipService          tryToLoadStack          158 启动Sip服务

api.SipProfile          formatCalleeNumber          1740 格式化输入号码

api.SipUri          parseSipContact                  152 解析SIP联系

api.SipUri$ParsedSipContactInfos getReadableSipUri  106 获取可用SipUri

api.SipUri$ParsedSipContactInfos getReadableSipUri  106 获取可用SipUri

api.SipUri$ParsedSipContactInfos getReadableSipUri  106 获取可用SipUri

service.SipService$ToCall          getCallee              1838 返回被叫号码

service.SipService$ToCall          getPjsipAccountId      1831 返回账号id

api.SipUri          getCanonicalSipContact          251    生成sip uri

api.SipUri          getCanonicalSipContact          266    生成sip uri

service.SipService$ToCall          getCallee              1838 返回被叫号码

api.SipUri          getCanonicalSipContact          251    生成sip uri

api.SipUri          getCanonicalSipContact          266    生成sip uri

service.SipService$ToCall          getCallee              1838 返回被叫号码

7)更新消息状态

api.SipMessage          &lt;init&gt;                      204    构造原始数据

api.SipMessage          setRead                      335    设置为已读

api.SipMessage          getContentValues              234    存储content

db.DBProvider          insert                          391    插入数据

pjsip.UAStateReceiver          on_pager_status          361

pjsip.PjSipService          pjStrToString              2328

api.SipUri          getCanonicalSipContact          251    生成sip uri

api.SipUri          getCanonicalSipContact          266    生成sip uri

pjsip.PjSipService          pjStrToString              2328

pjsip.PjSipService          pjStrToString              2328

db.DBProvider          update                          651

api.SipMessage          getTo                          325

service.SipService$ handleMessage                      1951

service.SipService$SipRunnable          run          2083

service.SipService          startSipStack              1383 启动SIP栈

service.PreferenceProvider          query              92    查询

service.SipService          isConnectivityValid      1336 连接是否有效

service.PreferenceProvider          query              92    查询

db.DBProvider          query                              485    查询

service.PreferenceProvider          query              92    查询

service.PreferenceProvider          query              92    查询

service.PreferenceProvider          query              92    查询

pjsip.PjSipService          sipStart                  200    启动SIP栈

service.PreferenceProvider          query              92    查询

db.DBProvider          query                              485    查询

ui.messages.MessageFragment          onLoadFinished     319    加载完成

ui.messages.MessageAdapter          newView          182    返回一项数据

ui.messages.MessageAdapter          bindView          82    返回一项数据

api.SipMessage          &lt;init&gt;                      222    构造Sip消息封装

api.SipMessage          createFromContentValue      250 从content读取账号

api.SipMessage          getRemoteNumber              356    获取对方的号码

api.SipMessage          getDate                      415    发送消息时间

api.SipMessage          getBodyContent              369 发送消息内容

api.SipMessage          getErrorContent              382 发送消息错误内容

api.SipMessage          getMimeType                  450    消息Mime类型

api.SipMessage          getType                      440    消息类型

api.SipMessage          isOutgoing                  402 由程序发送给用户
</code></pre><h2 id="3"><a href="#3" class="headerlink" title="3"></a>3</h2><p>.点击送信按钮</p>
<pre><code>1) 点击送信

ui.messages.MessageFragment                 onClick                 300        点击送信按钮

service.SipService$1                 sendMessage                     324        送信

service.SipService                 getExecutor                         1027    运行任务

2) 启动送信服务

service.SipService                 onStart                             1252    启动Sip服务

service.SipService                 isConnectivityValid                 1336    当前的连接是否有效

service.SipService$SipServiceExecutor                 handleMessage     1951    接收消息

service.SipService$SipRunnable                 run                     2083    运行

pjsip.PjSipService                 sendMessage                         1463    送信

pjsip.PjSipService                 getProfileState                     977        返回动态SIP模式状态

api.SipProfileState                 &lt;init&gt;                             151        持有sip profile状态

service.PreferenceProvider                 query                         92        查询

db.DBProvider                 query                                     485        查询

api.SipProfileState                 createFromContentValue             270        从content读取账号

service.PreferenceProvider                 query                         92        查询

api.SipProfileState                 isAddedToStack                     535        是否把账号加入Stack

service.SipService                 getAccount                             1851    获取账号

api.SipProfile                 getProfileFromDbId                         1778    检索SIP对象

service.PreferenceProvider                 query                         92        查询

db.DBProvider                 query                                     485        查询

service.PreferenceProvider                 query                         92        查询

pjsip.PjSipService                 setService                             147        pj添加SipSever对象

pjsip.PjSipService                 tryToLoadStack                         158        启动Sip服务

service.SipService                 getExecutor                         1027    运行任务

api.SipProfile                 formatCalleeNumber                         1740    格式化输入号码

api.SipUri                 parseSipContact                             152        解析SIP联系

api.SipUri$ParsedSipContactInfos                 getReadableSipUri     106        获取可用SipUri

api.SipUri$ParsedSipContactInfos                 getReadableSipUri     106        获取可用SipUri

ui.messages.MessageAdapter                 bindView                     82        创建View

api.SipMessage                 &lt;init&gt;                                     222        构造Sip消息封装

api.SipMessage                 createFromContentValue                     250        从content读取账号

api.SipMessage                 getRemoteNumber                         356        获取对方的号码

api.SipMessage                 getDate                                 415        发送消息时间

api.SipUri$ParsedSipContactInfos                 getReadableSipUri     106        获取可用SipUri

service.SipService$ToCall                 &lt;init&gt;                         1822

service.SipService$ToCall                 getCallee                     1838    返回被叫号码

api.SipMessage                 getBodyContent                             369        发送消息内容

api.SipMessage                 getErrorContent                         382        发送消息错误内容

api.SipMessage                 getMimeType                             450        消息Mime类型

api.SipMessage                 getType                                 440        消息类型

service.SipService$ToCall                 getPjsipAccountId             1831    返回账号id

api.SipUri                 getCanonicalSipContact                         251        生成sip uri

api.SipUri                 getCanonicalSipContact                         266        生成sip uri

service.SipService$ToCall                 getCallee                     1838    返回被叫号码

api.SipUri                 getCanonicalSipContact                         251        生成sip uri

api.SipUri                 getCanonicalSipContact                         266        生成sip uri

service.SipService$ToCall                 getCallee                     1838    返回被叫号码

3) 更新消息状态

api.SipMessage                 &lt;init&gt;                                     204        构造Sip消息封装

api.SipMessage                 setRead                                 335        设置为已读

api.SipMessage                 getContentValues                         234        存储content

db.DBProvider                 insert                                     391        插入

pjsip.PjSipService                 pjStrToString                         2328

api.SipUri                 getCanonicalSipContact                         251        生成sip uri

api.SipUri                 getCanonicalSipContact                         266        生成sip uri

pjsip.PjSipService                 pjStrToString                         2328

pjsip.PjSipService                 pjStrToString                         2328

db.DBProvider                 update                                     651        更新

4) 更新界面

api.SipMessage                 isOutgoing                                 402        由程序发送给用户

api.SipMessage                 getTo                                     325        得到消息

service.SipService$SipServiceExecutor                 handleMessage     1951    接受消息

service.SipService$SipRunnable                 run                     2083    运行

service.SipService                 startSipStack                         1383    启动SIP栈

service.PreferenceProvider                 query                         92        查询

service.SipService                 isConnectivityValid                 1336    连接是否可用

service.PreferenceProvider                 query                         92        查询

db.DBProvider                 query                                     485        查询

service.PreferenceProvider                 query                         92        查询

db.DBProvider                 query                                     485        查询

service.PreferenceProvider                 query                         92        查询

service.PreferenceProvider                 query                         92        查询

pjsip.PjSipService                 sipStart                             200        启动SIP栈

ui.messages.MessageFragment                 onLoadFinished             319        加载完成

service.PreferenceProvider                 query                         92        查询

ui.messages.MessageAdapter                 bindView                     82        创建View

api.SipMessage                 &lt;init&gt;                                     222        构造Sip消息封装

api.SipMessage                 createFromContentValue                     250        从content读取账号

api.SipMessage                 getRemoteNumber                         356        获取对方的号码

api.SipMessage                 getDate                                 415        发送消息时间

api.SipMessage                 getBodyContent                             369        发送消息内容

api.SipMessage                 getErrorContent                         382        发送消息错误内容

api.SipMessage                 getMimeType                             450        消息Mime类型

api.SipMessage                 getType                                 440        消息类型

api.SipMessage                 isOutgoing                                 402        由程序发送给用户

ui.messages.MessageAdapter                 newView                     182        返回View

ui.messages.MessageAdapter                 bindView                     82        创建View

api.SipMessage                 &lt;init&gt;                                     222        构造Sip消息封装

api.SipMessage                 createFromContentValue                     250        从content读取账号

api.SipMessage                 getRemoteNumber                         356        获取对方的号码

api.SipMessage                 getDate                                 415        发送消息时间

api.SipMessage                 getBodyContent                             369        发送消息内容

api.SipMessage                 getErrorContent                         382        发送消息错误内容

api.SipMessage                 getMimeType                             450        消息Mime类型

api.SipMessage                 getType                                 440        消息类型

api.SipMessage                 isOutgoing                                 402        由程序发送给用户



4.接受短信

pjsip.UAStateReceiver             timer_schedule         638        触发任务

pjsip.UAStateReceiver             on_pager             322        获取消息,插入数据库,发送广播

pjsip.PjSipService             pjStrToString             2328

api.SipUri             getCanonicalSipContact             251        生成sip uri

api.SipUri             getCanonicalSipContact             266        生成sip uri

pjsip.PjSipService             pjStrToString             2328

pjsip.PjSipService             pjStrToString             2328

pjsip.PjSipService             pjStrToString             2328

pjsip.PjSipService             pjStrToString             2328

api.SipMessage             &lt;init&gt;                         204        构造原始数据

api.SipMessage             getContentValues             234        存储content

db.DBProvider             insert                         391        插入数据

api.SipMessage             getFrom                     305        获取Message

api.SipMessage             getBody                     315        获取Message内容

service.SipNotifications showNotificationForMessage 368        通过Notification显示消息

api.SipMessage             getFrom                     305        获取Message

api.SipMessage             getFullFrom                 426        返回被叫人uri

models.CallerInfo             getCallerInfoFromSipUri 113

api.SipMessage             getFullFrom                 426

api.SipMessage             getDisplayName                 346        获取显示名

api.SipUri             getDisplayedSimpleContact         193        返回简单显示

api.SipUri             parseSipContact                 152        解析SIP联系

api.SipMessage             getDisplayName                 346        获取显示名

api.SipUri             getDisplayedSimpleContact         193        返回简单显示

api.SipUri             parseSipContact                 152        解析SIP联系

api.SipMessage             getBody                     315        获取Message内容

api.SipMessage             getFrom                     305        获取Message

api.SipMessage             getBody                     315        获取Message内容

api.SipMessage             getBody                     315        获取Message内容

service.SipWakeLock                     84
</code></pre>
      
    </div>
    
    
    

    <div>
      
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

      
    </div>

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <!--<a href="/tags/csipsimple/" rel="tag"># csipsimple</a>-->
            <a href="/tags/csipsimple/" rel="tag"><i class="fa fa-tag"></i> csipsimple</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/12/25/2017-12-25-Android Studio显示行数/" rel="next" title="Android Studio显示行数">
                <i class="fa fa-chevron-left"></i> Android Studio显示行数
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/12/25/2017-12-25-900.蚂蚁金服学习/" rel="prev" title="900.蚂蚁金服学习">
                900.蚂蚁金服学习 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到：</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>

<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
  data_track_clickback:true,
  summary:"",
  shortUrl:false,
  hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=" charset="utf-8"></script>
<!-- JiaThis Button END -->
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/ichgo.jpg"
                alt="廖壬" />
            
              <p class="site-author-name" itemprop="name">廖壬</p>
              <p class="site-description motion-element" itemprop="description">Learn to choose, to forsake, to endure loneliness, to resist temptation.</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">391</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">11</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">56</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/liaoren512" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:liaoren512@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/5281757990/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="Weibo">
                      
                        <i class="fa fa-fw fa-globe"></i>Weibo</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.zhihu.com" target="_blank" title="Zhihu">
                      
                        <i class="fa fa-fw fa-globe"></i>Zhihu</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-空页面"><span class="nav-number">1.</span> <span class="nav-text">1.空页面</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-作成-发送短信"><span class="nav-number">2.</span> <span class="nav-text">2.作成,发送短信</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3"><span class="nav-number">3.</span> <span class="nav-text">3</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        
<!--<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>-->

<div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">廖壬</span>

  
</div>

<!-- 在网站底部加上访问量-->
<!--<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
  本站访客数:<span id="busuanzi_value_site_pv"></span>
</span>
</div>-->
<!--pv的方式，单个用户连续点击n篇文章，记录n次访问量-->
<!--

  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>



-->
<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">博客全站共字</span>
</div>
        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  



  
  









  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three-waves.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  

  

  

</body>
</html>
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/love.js"></script>